﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;


namespace AmuTools.SFExpress.dto
{
    [XmlRoot("Order")]
    public class OrderRequestDto
    {
        /// <summary>
        /// 客户订单号
        /// </summary>
        [XmlAttribute("orderid")]
        public string OrderId { get; set; }

        /// <summary>
        /// 顺丰运单号，一个订单只能有一个母单号，如果是子母单的情况，以半角逗号分隔，主单号在第一个位置，如“755123456789,001123456789,002123456789”，对于路由推送注册，此字段为必填。
        /// </summary>
        [XmlAttribute("mailno")]
        public string MailNo { get; set; }

        /// <summary>
        /// 是否要求返回顺丰运单号：1：要求，其它为不要求
        /// </summary>
        [XmlAttribute("is_gen_bill_no")]
        public string IsGenBillNo { get; set; }

        /// <summary>
        /// 寄件方公司名称，如果需要生成电子运单，则为必填。
        /// </summary>
        [XmlAttribute("j_company")]
        public string JCompany { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("express_type")]
        public string ExpressType { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("j_province")]
        public string JProvince { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("j_city")]
        public string JCity { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("j_contact")]
        public string JContact { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("j_tel")]
        public string JTel { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("j_address")]
        public string JAddress { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("d_province")]
        public string DProvince { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("d_city")]
        public string DCity { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("d_county")]
        public string DCounty { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("d_company")]
        public string DCompany { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("d_contact")]
        public string DContact { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("d_tel")]
        public string DTel { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("d_address")]
        public string DAddress { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("parcel_quantity")]
        public string ParcelQuantity { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("pay_method")]
        public string PayMethod { get; set; }

        /// <summary>
        /// 顺丰月结卡号
        /// </summary>
        [XmlAttribute("custid")]
        public string CustId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("customs_batchs")]
        public string CustomsBatchs { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlAttribute("cargo")]
        public string Cargo { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [XmlArray]
        public List<OrderAddedServiceDto> AddedService { get; set; }
    }

    public class OrderAddedServiceDto
    {
        [XmlAttribute("name")]
        public string Name { get; set; }

        [XmlAttribute("value")]
        public string Value { get; set; }

        [XmlAttribute("value1")]
        public string Value1 { get; set; }
    }
}
